// components/agreement/agreement.js

Component({
    externalClasses: ['custom-class'],
    properties: {
        value: {
            type: Boolean,
            value: false,
        },
        texts: {
            type: Array,
            value: ['用户协议'],
        },
    },
    data: {},
    methods: {
        // 同意协议
        onChange(e) {
            this.setData({
                value: e.detail,
            });
            this.triggerEvent('change', e.detail);
        },
        onClick(e) {
            const { index } = e.currentTarget.dataset;
            this.triggerEvent('click', index);
        },
    },
});
